*********************************************************************
This article is being presented through the *StarBoard* Journal of
the FlagShip/StarShip, SIGS (Special Interest Groups) on the
Delphi and GEnie telecommunications networks.  Permission is
hereby granted to non-profit organizations only to reprint this
article or pass it along electronically as long as proper credit
is given to both the author and the *StarBoard* Journal.
*********************************************************************

         CP/M Mini-Primer  ***  Easy Handling of DIRectories
                          By: Mike Mantino
                     GEnie Mail Address: MIKEM
  -------------------------------------------------------------------

    You've finally booted up CP/M Plus on your C-128.  There's that
cryptic A> prompt staring you in the face, waiting for you to do
something.  You say to yourself, 'Now how the heck do I see what is
on this disk?'.  Ah, glad you asked!

    Let's assume you have two 1571 disk drives and a 1750 RAM
expansion module.  In CP/M, the 1571 with device #8 is now referred
to as drive A and the 1571 with device #9 is now referred to as
drive B.  The 17xx RAM expansion should be thought of as another disk
drive, but lots quicker.  It is assigned the drive designation M.

    When CP/M is first booted up, the default drive is A, hence the
prompt A>.  You can change the default drive at any time by typing
the letter of the drive followed by a colon and <RETURN>.  The prompt
should then display the current default drive designation, such
as B>.

    If you still have your CP/M system disk in drive A, typing DIR
followed by <RETURN> will show you a listing of files that are on
that disk.  It may or may not be a total list, depending on whether
files have been saved to other portions of the disk which are called
USER areas.  A CP/M disk has 16 different sections which are
partitioned off from each other (labeled 0 thru 15).  That cryptic A>
prompt should actually read A0>, since the default USER area upon
boot-up is 0.

    One way to check to see if files are in these other nooks and
crannies, is to change USER areas and type DIR again.  Let's see if
there are any files in USER area 1 on that disk.  First, change USER
areas by typing A1 and hitting <RETURN>.  Your prompt should now be
A1>.  Next, check the directory by typing DIR and hitting <RETURN>
again.  You can do this for all 16 different USER areas on that
disk. You can also change to drive B or M and check all USER areas
one at a time in much the same fashion.  Not much fun, is it?  Well,
it *can* be easier, as you will see.

    The DIR command has two versions.  The one that you have just
used is the 'built-in' version. The wildcards * and ? can be used,
and it's simple and to the point, but not very versatile.  It is
built into the CP/M operating system and does not require loading in
any utility program in order to use it, but you *do* have more power
at your disposal through the 'transient' version of DIR.  This
transient utility is included on your CP/M disk and has the filename
DIR.COM.  If you type DIR, followed by a set of parameters enclosed
in brackets, CP/M will automatically search the disk for the
transient DIR.COM and act upon those parameters, giving you enormous
versatility when dealing with multi-USER areas and multi-drives.
Let's explore these parameters and find out what DIR.COM has to
offer.

     If you wanted to get a directory listing of all USER areas and
all drives with one command, you would type:

              DIR [DRIVE=ALL USER=ALL]

     The right bracket need not be typed, and you must hit <RETURN>
after typing the command.  You will then be shown a sorted directory
of all files in all USER areas on all drives.  If the listing takes
up more than one screen, CP/M will halt the listing to allow you to
view one screen at a time.  To continue the display, just hit the
spacebar.  To abort the display, hit CNTRL-C.

     You will notice that a summary at the end of the listings will
show the number of files and the total number of bytes used by the
files.  Also, the listings are placed in alphabetical order across
each line.  This can be helpful when trying to find a specific file,
but also can be a hindrance since long directories are noticeably
longer to sort.  You can turn off the sorting by adding the NOSORT
option inside the brackets.  Here is another example:

              DIR [DRIVE=B USER=ALL NOSORT]
                        -OR-
              DIR B: [USER=ALL NOSORT]

     These two commands will return the same unsorted directory of
files in all USER areas of drive B.

     What follows is a listing of parameters available for DIR.COM, a
description of each, and an example of each.  Note that references
are made to Time-Stamping and other attributes which are beyond the
scope of this primer.  These parameters must be enclosed in brackets,
and may be used in conjunction with other parameters.

DRIVE=ALL   -   Displays files on all online drives.

DRIVE=(A,B,C,.....P)  -  Displays files on the drives specified.

ATT  -  Displays the user-definable attributes

DIR  -  Displays only files that have the DIR attribute

DATE  -  Displays date and time stamps of files.

EXCLUDE  -  Displays files that Do Not Match the files specified in
the command line.  Example:   DIR [EXCLUDE] *.COM     This command
will list all files on the default drive that do NOT have a filetype
of .COM

FULL  -  Displays the name, size, number of 128-byte records, and
attributes of the files.

FF  -  Sends an initial form-feed to the printer device, if the
printer has been activated using CNTRL-P.  (To print the DIR listing)

LENGTH=n  -  Displays n lines of printer output before inserting a
table heading.  n is a number between 5 and 65536.

MESSAGE  -  Displays the names of drives and USER numbers the command
is searching.

NOPAGE  -  Continuously scrolls the listing on the screen. (Used for
printouts of listings, basically)

NOSORT  -  Displays files in the order it finds them on disk.

RO  -  Displays only those files having the Read/Only attribute.

RW  -  Displays only those files having the Read/Write attribute.

SIZE  -  Displays the filename and size in kilobytes (1024 bytes).

SYS  -  Displays only those files having the SYS attribute.

USER=ALL  -  Displays all files in all USER areas of the default or
selected drive.

USER=n  -  Displays all files in the USER area specified by n.

USER=(0,1,2,.....15)  -  Displays all files in the USER areas
specified.

     Although this article only scratches the surface of just one of
CP/M's combination transient/built-in commands, it should wing you on
your way to a better overall understanding of the environment.  If
you would like to see more of these primers or have questions about
this one, leave mail to MIKEM on GEnie, MEYEK on People/Link, or
72767,2533 on Compuserve.

-Mike Mantino  7/24/86

*********************************************************************
This article is being presented through the *StarBoard* Journal of
the FlagShip/StarShip SIGs (Special Interest Groups) on the Delphi 
and GEnie telecommunications networks.  Permission is hereby granted
to non-profit organizations only to reprint this article or pass it
along electronically as long as proper credit is given to both the
author and the *StarBoard* Journal.
*********************************************************************
                                  -
                            CP/M Primer #2
                                  -
 Disk and File Attributes - Time/Date Stamping - Password Protection
                                  -
               By: Mike Mantino (GEnie address: MIKEM)
                                  -

Last month we discussed the DIR and DIR.COM utilities (built-in and 
transient) which allowed us to view the disk directory in a variety of 
ways using a number of options.  We were able to acquire listings of 
all the files we had on each drive and in each 'user area' of the disk, 
and in doing so we noticed that these files had their own distinct 
attributes.  Some were SYS files, others were DIR files, and they all 
had a two-letter identifier signifying whether they were Read-Only (RO) 
or Read-Write (RW).  So, too, we had brushed over the term 
'time-stamping' and inferred that it was possible to password-protect 
individual files and/or whole disks.  This month we will attempt to
change and set these attributes and parameters in order to give you full 
control over your disk files.

                                  -

The first thing we need to do upon boot-up of CP/M is to set the
current time and date.  This will later allow us to use time and date 
stamping of our files, so we can quickly locate the most recent copy of 
a file and check to see when it was last updated or accessed from 
disk.  Let's do this right now.  

The DATE command is another transient utility that allows us to change
the current date and time of day.  When you boot-up CP/M, the date and
time are defaulted to the creation date of your system.  Let's see what
that current time and date is.  At the A> prompt, type DATE.  CP/M will
respond with something like:  SAT 07/18/85 10:45:10     Now we will
change this to the current date and time.  There are two ways of doing
this.  The first is to type DATE followed by the current day and time, 
in the format:  MM/DD/YY HH:MM:SS    For example, we might type:

  A> DATE 08/10/86 11:30:00

CP/M would respond with:
  
  Press any key to set time.

Another way of going about the same thing, would be to type DATE SET, 
and letting CP/M prompt us for input.  For instance:

  A> DATE SET

Would cause CP/M to respond with:

  Enter todays date (MM/DD/YY):

Enter the date, or just press <RETURN> to skip the date, and CP/M will
then respond with:

  Enter the time (HH:MM:SS):

Enter the time, or press <RETURN> to skip the time, and CP/M will
respond with:

  Press any key to set the time.

Now that we have set the current date and current time, let us check
to ensure that CP/M has indeed noticed our actions.  At the A> prompt,
type DATE and make sure that the date and time is actually what we had
set it to.

                                  -

We are ready to begin time and date-stamping of our files on disk and
set up blank disks for future stamping.

To do this, we must first run the INITDIR utility in order to 
initialize the directory.  If files already exist on the disk, INITDIR 
will check the space available for date and time stamps in the 
directory.  If there is not enough room there, INITDIR will not 
initialize it and will return an error message.  If the disk is 
blank, the utility will set up your disk and set aside the appropriate 
space in the directory to store the stamping.  INITDIR can also be used 
to clear time/date stamping from an already initialized disk, thus 
recovering some disk space.  Let's take an example of how all of this 
is accomplished.

  A> INITDIR

The system will return the following message:

  INITDIR WILL ACTIVATE TIME STAMPS FOR SPECIFIED DRIVE.
  Do you really want to re-format the directory: A  (Y/N)?

If the directory were already initialized for time and date stamping, 
then INITDIR would ask you:

  Directory is already re-formatted.
  Do you wish to recover date/time stamping directory space (Y/N)?

Answering Y will eliminate stamping on that disk and recover space.  If 
you answer N, then stamping remains active and INITDIR will then ask:

  Do you want the existing date/time stamping cleared (Y/N)?

Entering Y will clear all current dates and times, but keep the disk 
initialized for further stamping.

                                  -

Now we are ready to stamp some files with the current date and time, 
and once that is accomplished, any time we access or change that file, 
the current time and date can be easily assigned.  We need to use the 
SET utility to set-up the file for the current time and date.

This SET utility is one with lots of power.  Besides using it for time 
and date stamping, it can allow us to set the file attributes (R/O and 
R/W, DIR and SYS), set the disk attributes (R/O and R/W), assign a 
label to the disk (just like a disk name in 64/128 mode), and assign 
passwords to the disk and/or files.  More about these other options 
later.  First, let's finish up time/date stamping.

SET has three accompanying specifications for time and date stamping.  
They are:  ACCESS, CREATE, and UPDATE.   The first two, ACCESS and 
CREATE, are mutually exclusive options, meaning that when one is turned
on, the other is automatically off.

SET [CREATE=ON] is used before you create a CP/M file and will record 
the creation time of that file.

SET [ACCESS=ON] is used to record when the last file was accessed.

SET [UPDATE=ON] is used to record the time that the file was last 
updated.

Thus, if you use both CREATE and UPDATE together, editing a file will 
change both the UPDATE and CREATE stamps.

To view the file-stamping on your disk, all you have to do is use the 
DIR.COM utility with the [FULL] specification, like this:

  A> DIR [FULL]

The best way to understand how this stamping operation works is to set 
ACCESS to ON, then load in a file on your disk.  Abort from the 
program and type in the DIR [FULL] command to see what has happened.

                                  -

Now we will review how to set the file attributes to READ ONLY, 
READ/WRITE, SYS, and DIR.

As you know, files that have a SYS designation are SYStem files which, 
when in USER area 0 can be accessed from *any* USER area of the disk.
To set a file to a SYStem file, we would call up the SET command again, 
but in this form (assuming that the file is called TESTING.COM):

  A> SET TESTING.COM [SYS]

We could have, at the same time, set that same file so that it were 
READ ONLY by typing this:

  A> SET TESTING.COM [RO SYS]

The same holds true for the DIR and READ/WRITE attributes.

That was easy enough, and so is doing the same for the drive itself!
To set drive B for READ ONLY, we would type:

  A> SET B: [RO]

NOTE that setting a drive to READ ONLY would mean that PIP could not 
copy a file to it, RENAME could not rename a file on it, ERASE could 
not delete a file from it, and you could not perform any disk writing 
operation.  Specifying READ/WRITE (RW) will reset the drive to its 
original state, as will pressing CONTROL-C.

                                  -

Now, let's set up a label for your disk, just like giving the disk a 
name in C-64 or C-128 mode.

We can assign a label name of up to eight characters, plus a three 
character type, similar to a file name and file type.  For instance:

  A> SET [NAME=GAMES.108]

This would give our disk the name GAMES.108.  If we did not specify any 
name, the label would be defaulted to LABEL.  Labels make it easy for 
us to catalog all of our CP/M disks.

                                  -

We aren't done with the SET utility yet!  If you've ever wanted to
password-protect a disk or disk file before, now is your chance.

To assign a password to the entire disk (actually to the disk label), 
all you need to do is use the following format.  We will assume that 
you want to use a password of GENIE......

  A> SET [PASSWORD=GENIE]

Easy enough.  Hereafter, the SET command will prompt for this password 
whenever you (or anyone else) tries to set any of the functions that 
are controlled by the SET utility.  If you do not set up a disk 
password (label password), then anyone who has access to the disk can 
set up other attributes using SET, which will make the disk 
inaccessible to *you*!

Any time you want to remove this password from the disk label, use the 
same syntax you used to assign it, but instead of the word just hit 
<RETURN>.  Example:

  A> SET [PASSWORD=<RETURN>

Again, note that the first bracket '[' must be used for specs, but the 
ending bracket ']' is optional.

                                  -

Along with password-protecting the disk, we can also assign passwords 
to individual files on that disk.  To do this, we must first tell CP/M 
to turn on protection for all disk files.  We do this with yet another 
form of the SET utility:

  A> SET [PROTECT=ON]

Now we specify the file which we want to assign a password to, and then 
the password itself:

  A> SET TESTFILE.TXT [PASSWORD=GENIE]

Passwords for files do not need to be the same as those you use for the 
disk.  Also, passwords can be up to eight characters in length, and all 
lower-case letters are translated to uppercase.  In addition, you may 
use wildcards in your filespecs and SET will assign that password to 
all files that match.

Now we can set a password-protection mode for those files with 
passwords.  There are four forms we can use: READ, WRITE, DELETE, and 
NONE.  An example of this would be:

  A> SET TESTFILE.TXT [PROTECT=READ]

Here is an explanation of the individual modes and the level of 
protection they give your files:

READ - The password is required in order to read, copy, write, delete 
or rename the file.

WRITE - The password is required in order to write, rename, or delete 
the file.  The password is not neccessary to read the file.

DELETE - The password is required only if you want to rename or delete 
the file.  The password is not neccessary to modify or read the file.

NONE - No password is in existence for the file.  If one does exist, 
you may use this to delete the password.

Here are two examples of chaining specs in order to password protect 
files:

  A> SET TESTFILE.TXT [PASSWORD=GENIE PROTECT=WRITE]
  A> SET *.TXT [PASSWORD=GENIE PROTECT=WRITE]

The first example sets the password 'GENIE' to the file called 
TESTFILE.TXT, and makes it WRITE protected to prevent someone from 
editing it.

The second example does the same thing, but because we used the * 
wildcard, *all* text files on the disk will be given the password and 
WRITE protection.

                                  -

WARNING!!!!   Always make a record of your passwords!  You will not be 
able to access your files without your file-passwords, unless you turn 
off the protection for the whole disk.  AND!!.....if you forget the 
password to the disk itself, you cannot access the disk in order to 
access those files!

                                  -

NOTES:  I realize that the options we have discussed this month are not 
really basic essentials that one needs to know, but they do go a long 
way in familiarizing you with the CP/M environment and the syntax that 
is used in almost all programs and utilities encountered in this 
environment.

Next month we will discuss the KEYFIG utility that allows us to set-up 
default colors, change our keyboard configuration, and execute them 
automatically upon boot-up.  Also, we will tke a peek into SUBMIT files
and the PROFILE.SUB start-up file.  Same time, same station!

-Mike Mantino 

*********************************************************************
This article is being presented through the *StarBoard* Journal of
the FlagShip/StarShip, SIGS (Special Interest Groups) on the
Delphi and GEnie telecommunications networks.  Permission is
hereby granted to non-profit organizations only to reprint this
article or pass it along electronically as long as proper credit
is given to both the author and the *StarBoard* Journal.
*********************************************************************

                                  -
                            CP/M Primer #3
                                  -
             By: Mike Mantino   (GEnie MAIL address: MIKEM)
                                  -

Welcome back!  If you're still with us after reading the first two CP/M
Primer articles, you've probably concluded that although the CP/M
environment is a lot different from the Commodore operating system (and
a bit slower on our 128's than in most CP/M machines), it is
nonetheless an interesting and powerful world.  This month we will add
to that power and discuss ways to speed up the system and generally
make life easier for you thru the use of key configurations and batch
processing of commands in a variety of ways.

                                  -

Let's get organized, first.  Because the C-128 does not automatically
boot-up in CP/M mode, we have to do it manually by loading-in the CP/M
system files.  Once that is done, there really isn't any need to have
those files on our disk, so it makes sense to create just one CP/M BOOT
disk (plus a backup).  That disk should also include some important
files and programs that will aid in setting up your initial parameters
and getting things set correctly for the rest of your CP/M session.
The files I use quite often upon boot-up are: CONF.COM, NFORMAT.COM,
SUBMIT.COM, DIR.COM, DATE.COM, SHOW.COM, C1571.COM, NSWEEP.COM,
NULU15.COM, INITDIR.COM, TYPE.COM, and KEYFIG.COM.

CONF.COM is very important to us C-128 folks, because we need to adjust
a few parameters every time we boot-up CP/M.  For instance, by turning
off the 40-column display, we can gain a speed increase of about 10%.
This is accomplished, simply enough, by typing: conf 40col=off

We can change a wide variety of things using CONF.COM which will
enhance the way we do things.  All of the parameters that follow
require that you precede them with: conf.    You can, however, string a
number of them together in one command line which starts with: conf.

40col=off  - As stated, this turns off the 40-column display.  To turn
it back on, you would use: 40col=on

feel=0     - This parameter adjusts the way the keyboard 'feels'.  The
keyboard is scanned with the same interrupts used in handling the
serial port, so as the BAUD rate is increased, the number of keyscans
per second is increased.  Because of this, we use FEEL to set the
number of interrupts that are *not* used between each one that *is*.
The default values for the different baud rates are set to keep about
300 keyscans per second.  For instance, at 300 baud, the FEEL is
defaulted to 2.

baud=75    - The modem port baud rate adjustment can be changed to any
of these values:  50,75,110,134,150,300,600,1200.  I have found that
75 seems to be both a fast and reliable speed.  Remember that changing
this also changes the FEEL.

back=6     - Change the background color by supplying the appropriate
color number.

bord=6     - Same as above, but for the border color.

char=9     - Same as above, but for the character color.

cursor=fast 7   - For the 80-col display cursor.  This example sets up
the cursor to be a flashing (fast or slow) underline.  You may set it
up as 'solid' instead of fast or slow, and also include the optional
start and end scan line parameters.  Examples:  cursor=solid 0 4
or  cursor=slow 4.

date=      - This parameter was reviewed in CP/M Primer #2.

dump xxxx  - Allows you to dump 16 bytes of memory starting from the
HEX address supplied (xxxx).  This is RAM BANK 0, *not* the TPA memory.

map        - This will show both of the character sets.

parity=<number><parity><stops>   - The options in which the serial data
can be sent or received, normally defaulted to 8 bits/no parity/1 stop
bit (8N1).

poke xxxx - This powerful command allows you to change bytes within the
operating system (again, BANK 0, *not* the TPA).  The range you can
change is 1000 to FEFF. (Below 1000h is ROM)
Example: poke 4000=21 22 23 24 25  (will write 21 to 4000, 22 to 4001,
etc).

prt1=cbm  - Specifies either CBM or ASCII sent to the printer on the
serial port. A secondary address may be added to allow different
printer and interface configurations.  Note: If your printer/interface
allows a transparent mode and you find you are unable to print a dbl
quote mark ("), use: prt1=ascii x  (where x is the secondary address,
usually 4, 5, or 7)

repeat=0  - If a 0 is specified here, then your keys will not repeat.
Otherwise the lower the number, the the faster the repeat.

vol=0     - You can set the volume of the keyclicks with this
parameter.  If a 0, you will turn them off.  15 will set the highest
volume, and the default is a 6.

Okay, so that's the run-down on our CONF.COM options.  Now we will make
it easy to use.  As previously stated, we can string a number of these
parameters together on the same command line.  Every time I boot-up
CP/M I send the following CONF commands:

conf 40col=off,cursor=solid 6,back=6,char=9,vol=0,repeat=1,feel=1

Easy enough, but still not the best way to do things, since you need to
type this in at each system reset.  We will see in a few minutes that
we can make that command line be executed automatically upon booting
the CP/M system.  Before going into how that is done, let's discuss one
more of the modular utilities we have at our disposal so that we can
include both of them into the automatic process (batch processing).

                                   -

The little utility called c1571.com is used specifically to turn off
disk verify's on any or all of your drives, thus gaining additional
speed.  The format for the utility is: c1571 [drive letter, drive
letter, drive letter, etc].  So, if you had two 1571's (drives A and
B) and a 17xx RAM expansion module, plus the virtual drive E, your
format might look like:  c1571 [a,b,e,m].

                                   -

Now that we know how to set up our system to allow it to run more
efficiently, and we have an idea of what parameters we want to
customize, let's store those things in such a way that they are brought
up automatically and directly after the CP/M system is loaded in.

The reason we can do this is because every time we load CP/M into
the 128, it looks for a special file called PROFILE.SUB.
If it is present, CP/M+ will then look for and run a file called
SUBMIT.COM which in turn will go to the PROFILE.SUB file and execute
all the commands you have put into it.

Given that we now have SUBMIT.COM on our disk, and know what commands
we need to put into the PROFILE.SUB file, let's do it.

All it takes to create any .SUB file (in this case, PROFILE.SUB) is an
editor or word processor of some sort.  Both ED.COM and WordStar work
well, and PIP can also be used (but not if you want to do any editing).
Here is an example of what a PROFILE.SUB file should look like:

^z
c1571 [a,b,e,m]
conf 40col=off,cursor=solid 6,back=6,char=9,vol=15,repeat=1,feel=1
a1: mex

Note that each command is given a separate line in the .SUB file.  The
above PROFILE.SUB file will turn off the disk verify on drives a, b, e,
and m.  It will then run CONF.COM and set up our parameters and colors,
and after that, will load MEX.COM from drive A, user area 1 (A1:).

After we create this file using an editor and save it to disk giving it
the filename PROFILE.SUB, it will be executed immediately after CP/M is
booted up.  SUBMIT.COM can also be used to run any other file that has
the .SUB extension, but you will need to manually do this using the
format:  submit <filename>.  For instance, if we had named that
PROFILE.SUB file FAST.SUB, it would not be executed initially with
the CP/M system.  But we could still execute all of our commands
contained in the file by manually typing:  submit fast.

SUBMIT.COM is a very powerful tool with a numerous amount of varied
uses.  Just about anything we manually type in at the keyboard can be
included in a .SUB file and executed using SUBMIT.COM.  We can even
include other SUBMIT commands inside other .SUB files, linking these
together to do a number of tasks for us, like copying files from drive
to drive using PIP inside the .SUB file.  The number of options and
ideas available for SUBMIT.COM is endless, but this article is geared
toward familiarizing one with the CP/M environment in general.  If you
plan on doing much with CP/M, learning how SUBMIT.COM works will
greatly enhance your systems efficiency and save you bunches of time.

                                 -

The first thing I had done when I acquired my C-128 was to learn how to
use the KEYFIG.COM utility.  I wasn't very impressed with the purple
character color that came up with the system; changing it manually was
getting old, quickly; and I had no idea what a PROFILE.SUB was.  I was
also used to having programmable function keys, true Commodorian that I
am.   KEYFIG.COM allowed me to do both, easily.  It also implants these
things directly on the disk(s), and you never have to use the resident
keyboard editor and function editor again.

Since I happen to like blue characters on a black background, I'll
explain the method of doing just that.  Afterwards, we'll redefine the
British Pound key so that we can make better use of it.

First, boot-up KEYFIG.COM and find yourself another CP/M disk that
you'd like to put a few changes into.  Initially, you will be asked if
you want any HELP, and since it's hard to turn down the first time you
use a program, go ahead and answer 'Sure!'.  (Actually, you must answer
with a Y for YES.  Boring, isnt it?)

After scrolling up and down the HELP options with the cursor keys (the
ones at the top of the keyboard, *not* the two keys next to SHIFT), hit
<RETURN> and you will be given the appropriate HELP file.  When you've
had enough, choose '--> done help <--' and we will start messing things
up.

Now, you will be given three options to choose from as far as sources
of the key definitions.  We can take them from the DEFAULT definitions,
the definitions on our CP/M disk, or the CURRENT definitions.  Since we
are going to be saving the set-up to the disk, we may as well take them
from the disk in the first place.  After choosing the CP/M disk option,
you will be shown three more options: EDIT KEYS, ASSIGN COLORS, and
EXIT/SAVE WORK.  We'll do the colors first, so choose that.

The next options are for 40-Column or 80-Column screens.  Choose the
apropriate one, and you will be shown two nifty pallettes of colors.
Looks nice, huh?  But what the heck does LOGICAL and PHYSICAL have to
do with colors?  Well, the LOGICAL colors are the key-defined colors. In
other words, that little purple box in the LOGICAL color map (letter e)
is the one we want to change to blue.  So, since the program is now
asking you for a letter found in the LOGICAL map, tell it you want 'e'.
Then it's going to ask for a letter corresponding to a color in the
PHYSICAL color map.  The blue box is the one we want, and it's labeled
with the letter 'o', so respond with that.

Now we can go ahead and make the color change semi-permanent and save
it to disk.  Choose the option:  done logical<-->physical colors.
Now choose to: Exit and save your work file on CP/M disk.
The colors are now imbedded, and the program will ask if there is
anything else you want to fool around with.  Tell it 'Y' again, and we
can set up that British Pound key that we hardly ever use.

We are now back at the initial three options, but this time we want to
EDIT KEYS.  Choosing that will give us a list of values for some key on
our keyboard.  The NORMAL value is the unshifted value of the key that
is labeled.  The others are SHIFTED, CONTROL, and CAPS LOCK.  Now,
since we want to change the British Pound key, go ahead and press it.
You should see all the values change.  Starting to make sense?  You can
scroll up or down these values in order to set it up for a change in
that apropriate value.  Since we want to be able to just press the
British pound key (one keystroke) and get something other than that
symbol, cursor around until the lightbar is resting on the NORMAL
value.  Now hit the <RETURN> key.  The next options are fairly clear,
so select the option to ASSIGN A STRING.  You can now type in anything
you want the British Pound key to display instead of the symbol.  I
have it changed so that it displays:  dir [user=all,drive=all]   That
way, whenever I'm at a CP/M command prompt, I can hit just the British
Pound key and get a directory of all files on all drives in all user
areas of each disk.  You can redefine the SHIFTED value of the same key
so that it displays something entirely different.  The same for the
CONTROL value and CAPS LOCK value.  Then whenever you hit SHIFT and the
British Pound key, the string that you changed is displayed, and so on.

Once you have finished defining keys, select the 'exit string edit'
option and save the string to disk.  Every time you boot up that
particular disk, all of your redefined colors and keys will be
instituted without any more input from you.

KEYFIG.COM helps in other ways that I won't cover here, so do read
through the HELP files for information on the other options available.
One interesting aspect of KEYFIG is its ability to actually describe
what it can't display.  To refer to the left arrow key which is there
in the upper left corner of the keyboard, KEYFIG describes it as the
LEFT ARROW NEXT TO 1.  To describe the DELETE key, which has no
displayable ASCII code, KEYFIG refers to it as RUBOUT.

Lastly, remember that the CAPS LOCK key is not operative under CP/M,
so you must substitute the combination of C= and SHIFT keys for it.

If there is anything contained in this article or previous CP/M Primer
articles that you still do not understand or that I haven't made clear
enough, or if you have a question about some other area of CP/M-land,
stop by GEnie's Commodore *FlagShip* Roundtable at page 625, or the
CP/M Roundtable at page 685 and let us know.  There are a good number
of people in both places that are more than willing to help!

- Mike Mantino
  (GEnie Address: MIKEM)

For our DELPHI CP/M users, be sure to check with GARYWAYNE, the
CP/M SYSOP for the DELPHI *FlagShip*.